import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int S = sc.nextInt();
        long[][] arr = new long[2][n];
        for (int i = 0; i < n; i++) {
            arr[0][i] = sc.nextLong();
            arr[1][i] = sc.nextLong();
        }

        long S_Salary = 0l;
        while (method2(arr, n) >= S) {
            S_Salary += S;
            for (int i = 0; i < n; i++) {
                arr[1][i]--;
            }
        }

        for (int i = 0; i < n; i++) {
            if (arr[1][i] > 0) {
                S_Salary += arr[0][i] * arr[1][i];
            }
        }

        System.out.println(S_Salary);
        sc.close();
    }

    //计算所有士兵训练一次的花费
    public static long method2(long[][] arr, int n) {
        long ret = 0;
        for (int i = 0; i < n; i++) {
            if (arr[1][i] > 0) {
                ret += arr[0][i];
            }
        }
        return ret;
    }
}